home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / comm / tcp / hserv.lha / hserv / cgi-bin / fileServ.rexx.real < prev    next >
Text File  |  1999-05-24  |  598b  |  28 lines

  1. /* fileServ.rexx */
  2.  
  3. parse arg "file="file
  4. file=decode(file)
  5.  
  6. eol='A'x
  7. say "Content-Type: text/html"eol
  8.  
  9.  
  10. if exists("/htdocs/archive/"file) then do
  11.     say '
  12. <HTML>
  13. <HEAD><TITLE>'file'</TITLE></HEAD>
  14. <SCRIPT LANGUAGE="JavaScript"> function test()
  15. { document.location.pathname = "/archive/'file'";
  16. return true } </SCRIPT>
  17. <BODY onLoad="test()">Downloading 'file'...<br><LI><A HREF="/form.html"><back></A>
  18. </BODY></HTML>'
  19. end
  20. else do
  21.     say '
  22. <HTML>
  23. <HEAD><TITLE>File Server</TITLE></HEAD>
  24. File:' file 'does not exist on this server<br><LI><A HREF="/form.html"><back></A>
  25. </BODY></HTML>'
  26. end
  27.  
  28.